/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package smsku;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.JOptionPane;

/**
 *
 * @author Heri Setiyawan
 */
public class koneksi {
    public Connection conn;
    public Statement stt;
    public ResultSet rs;
    public String db = "jdbc:mysql://localhost/java";
    
    public void getKoneksi(){
        try{
            Class.forName("com.mysql.jdbc.Driver");
            conn = DriverManager.getConnection(db,"root","@pwd12345@");
            stt = conn.createStatement();
            System.out.print("koneksi success");
        }catch(Exception e){
            JOptionPane.showMessageDialog(null,"koneksi gagal \n "+e);
        }
    }
}
